/**
 * Copyright (C), 2015-2020, XXX有限公司
 * FileName: CalendarSpringFactory
 * Author:   zx
 * Date:     2020/7/29 22:52
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package org.example.factory;

import org.example.entity.CalendarDemo;
import org.springframework.beans.factory.FactoryBean;

import java.util.Date;


/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author zx
 * @create 2020/7/29
 * @since 1.0.0
 */
public class CalendarSpringFactory implements FactoryBean<CalendarDemo> {

    public CalendarSpringFactory(){
        System.out.println("CalendarDemoSpringFactoryBean created");
        System.out.println(new Date());
    }

    @Override
    public CalendarDemo getObject() throws Exception {
        return CalendarDemo.getInstance();
    }

    @Override
    public Class<?> getObjectType() {
        return CalendarDemo.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}